// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact iva0512@gmail.com
// @TermsOfServiceUrl http://www.byapps.cn/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"go_hw/controllers"

	"github.com/astaxie/beego"
)

func init() {

	ns := beego.NewNamespace("/api",
		beego.NSNamespace("/clazz",
			beego.NSInclude(
				&controllers.ClazzController{},
			),
		),
		beego.NSNamespace("/student",
			beego.NSInclude(
				&controllers.StudentController{},
			),
		),
		beego.NSNamespace("/teacher",
			beego.NSInclude(
				&controllers.TeacherController{},
			),
		),
		beego.NSNamespace("/course",
			beego.NSInclude(
				&controllers.CourseController{},
			),
		),
	)
	beego.AddNamespace(ns)
	beego.Router("/", &controllers.MainController{})
	//beego.Router("/api/clazz", &controllers.ClazzController{})
	//beego.Router("/api/student", &controllers.StudentController{})
	//beego.Router("/api/teacher", &controllers.TeacherController{})
	//beego.Router("/api/course", &controllers.CourseController{})
}
